package com.ha.system.salary.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ha.system.salary.mapper.HaEmployeeSalaryMapper;
import com.ha.system.salary.domain.HaEmployeeSalary;
import com.ha.system.salary.service.IHaEmployeeSalaryService;
import com.ha.common.core.text.Convert;

/**
 * 员工薪资Service业务层处理
 * 
 * @author admin
 * @date 2021-03-17
 */
@Service
public class HaEmployeeSalaryServiceImpl implements IHaEmployeeSalaryService 
{
    @Autowired
    private HaEmployeeSalaryMapper haEmployeeSalaryMapper;

    /**
     * 查询员工薪资
     * 
     * @param id 员工薪资ID
     * @return 员工薪资
     */
    @Override
    public HaEmployeeSalary selectHaEmployeeSalaryById(Long id)
    {
        return haEmployeeSalaryMapper.selectHaEmployeeSalaryById(id);
    }

    /**
     * 查询员工薪资列表
     * 
     * @param haEmployeeSalary 员工薪资
     * @return 员工薪资
     */
    @Override
    public List<HaEmployeeSalary> selectHaEmployeeSalaryList(HaEmployeeSalary haEmployeeSalary)
    {
        return haEmployeeSalaryMapper.selectHaEmployeeSalaryList(haEmployeeSalary);
    }

    /**
     * 新增员工薪资
     * 
     * @param haEmployeeSalary 员工薪资
     * @return 结果
     */
    @Override
    public int insertHaEmployeeSalary(HaEmployeeSalary haEmployeeSalary)
    {
        return haEmployeeSalaryMapper.insertHaEmployeeSalary(haEmployeeSalary);
    }

    /**
     * 修改员工薪资
     * 
     * @param haEmployeeSalary 员工薪资
     * @return 结果
     */
    @Override
    public int updateHaEmployeeSalary(HaEmployeeSalary haEmployeeSalary)
    {
        return haEmployeeSalaryMapper.updateHaEmployeeSalary(haEmployeeSalary);
    }

    /**
     * 删除员工薪资对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteHaEmployeeSalaryByIds(String ids)
    {
        return haEmployeeSalaryMapper.deleteHaEmployeeSalaryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除员工薪资信息
     * 
     * @param id 员工薪资ID
     * @return 结果
     */
    @Override
    public int deleteHaEmployeeSalaryById(Long id)
    {
        return haEmployeeSalaryMapper.deleteHaEmployeeSalaryById(id);
    }
}
